﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<ul class="nav pull-right">
<% if (Request.IsAuthenticated) { %>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%: User.Identity.Name %> <b class="caret"></b></a>
<ul class="dropdown-menu">
    <li><%: Html.ActionLink("Manage", "Manage", "Account") %></li>
    <li><% using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) { %>
        <%: Html.AntiForgeryToken() %>
        <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
    <% } %></li>
</ul>
</li>
<% } else { %>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Log in <b class="caret"></b></a>
<ul class="dropdown-menu">
    <li><%: Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })%></li>
    <li><%: Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })%></li>
</ul>
</li><% } %>
</ul>



